<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>新建产品</title>
	<link rel="stylesheet" href="css/reset.css">
	<link rel="stylesheet" href="css/product.css">
	<link rel="stylesheet" href="css/select-big.css">
	<link rel="stylesheet" href="css/zyUpload.css" type="text/css">
	<style>
		.main-content-box{
			padding-bottom: 0px;
		}
		.info-area {
		    border-bottom:none;
		}
		.content-info-product{
			padding:0px;
			margin-left: 110px;
		}
		.content-table-a {
		    width: 70%;
		}
		.content-table-a tbody tr td {
		    border-bottom: 1px dashed #efefef;
		}
		.info-area li >input {
		    width: 570px;
		}
		.content-table-a tbody tr td input {
		    width: 200px;
		    height: 32px;
		    margin-left: 3px;
		    background: #fff;
		    color: #999;
		    border: 1px solid #e6e6e6;
		    padding-left: 12px;
		    border-radius: 6px;
		    outline: none;
		    box-sizing: border-box;
		}
		.content-table-a tbody tr td .indexInput {
		    background:url(images/jiansuo.png)no-repeat right;
		}
		.content-btn {
		    border-bottom: none;
		}
		.delete-list{
			width: 24px;
		    height: 24px;
		    line-height: 22px;
		    font-size: 22px;
		    text-align: center;
		    display: inline-block;
		    font-style: normal;
		    color: #326EF7;
		    border: 1px solid #326EF7;
		    border-radius: 20px;
		    cursor: pointer;
		}
		.delete-list:hover{
			color: #fff;
			background: #326EF7;
		}
		.newSet-list {
		    width: 24px;
		    height: 24px;
		    line-height: 22px;
		    font-size: 22px;
		    text-align: center;
		    display: inline-block;
		    font-style: normal;
		    color: #326EF7;
		    border: 1px solid #326EF7;
		    border-radius: 20px;
		    cursor: pointer;
		}
		.newSet-list:hover{
			color: #fff;
			background: #326EF7;
		}
		.readInput{
			width: 150px;
		    height: 30px;
		    border: 1px solid #e6e6e6;
		    border-radius: 6px;
		    padding-left: 6px;
		    box-sizing: border-box;
		    cursor: pointer;
		    outline: none;
		}
		.textInput{
			width: 50px;
		    height: 30px;
		    border: 1px solid #e6e6e6;
		    border-radius: 6px;
		    text-align: center;
		    box-sizing: border-box;
		    cursor: pointer;
		    outline: none;
		}
		.info-area >li >span{
			width: 145px;
		}
		.mgauto {
		    display: inline-block;
		    margin: 0px 153px;
		}
		.content-table-text {
		    width: 595px;
		    margin-left: 142px;
		}
		.content-table-text tbody tr .td-2 {
		    width: 75%;
		    padding-left: 24px;
		    color: #dadada;
		}
		.prover-info {
		    padding-left: 142px;
		}
		.demo {
		    margin-top: 0px;
		    margin-left: 159px;
		}
	</style>
</head>
<body>
	<div class="main-content-box">
		<div class="main-bg1">
			<div class="content-list">
				<div class="content-btn" style="border-bottom:1px solid #e6e6e6;">
					<a class="icon-back" href="productList.html"></a><span class="title-info-a">新建产品</span>
				</div>
				<div class="content-btn matop30">
					<span class="title-info" style="margin-left:30px;">基本信息</span>
				</div>
				<form id = "baseInformation">
					<ul class="info-area">
						<li>
							<span class="info-red"><font color="red">*</font>产品代码：</span>
							<input itype="text" name = "code">
						</li>
						<li>
							<span class="info-red"><font color="red">*</font>产品名称：</span>
							<input type="text" name = "name">
						</li>
						<li>
							<span class="info-red"><font color="red">*</font>产品简称：</span>
							<input type="text" name = "subname">
						</li>
						<li>
							<span>合同前缀：</span>
							<input type="text" name = "prefix">
						</li>
						<li>
							<span class="info-red"><font color="red">*</font>产品类型：</span>
							<select class="multiselect" id="single" name = "type">
								<option value="1">资管计划</option>
								<option value="2">信托计划</option>
								<option value="3">契约型基金</option>
								<option value="4">有限合伙</option>
							</select>
						</li>
						<li>
							<span class="info-red"><font color="red">*</font>产品投资方向：</span>
							<select class="multiselect" id="single1" name = "investDirect">
								<option value="1">二级市场</option>
								<option value="2">债权投资</option>
								<option value="3">股权投资</option>
								<option value="4">海外投资</option>
								<option value="5">其他服务</option>
							</select>
						</li>
						<li>
							<span>收益分配方式：</span>
							<select class="multiselect" id="single2" name = "incomeDistribution">
								<option value="1">固定、浮动收益</option>
								<option value="2">固定收益</option>
								<option value="3">浮动收益</option>
							</select>
						</li>
						<li>
							<span>个人投资起点：</span>
							<input type="text" name = "personalInvestOri">元
						</li>
						<li>
							<span>机构投资起点：</span>
							<input type="text" name = "orgInvestOri">元
						</li>
						<li>
							<span>产品投资期限：</span>
							<input type="text" style="width: 465px;" name = "investDeadline">
							<select class="multiselect" id="single3" name = "investDeadlineType">
								<option value="1">年</option>
								<option value="2">月</option>
								<option value="3">日</option>
							</select>
						</li>
						<li>
							<span class="info-red"><font color="red">*</font>管理人：</span>
							<input type="text" name = "manager">
						</li>
						<li>
							<span>管理人类型：</span>
							<select class="multiselect" id="single4" name = "managerType">
								<option value="1">信托公司</option>
								<option value="2">基金公司</option>
								<option value="3">基金子公司</option>
								<option value="3">私募基金</option>
								<option value="3">证券公司</option>
								<option value="3">券商子公司</option>
								<option value="3">期货公司</option>
								<option value="3">保险公司</option>
								<option value="3">保险中介公司</option>
								<option value="3">其他</option>
							</select>
						</li>
						<li>
							<span>产品经理：</span>
							<input type="text" name = "productManager">
						</li>
						<li>
							<span>风险等级：</span>
							<select class="multiselect" id="single5" name = "riskRat">
								<option value="1">保守级</option>
								<option value="2">稳健级</option>
								<option value="3">平衡级</option>
								<option value="3">成长级</option>
								<option value="3">进取级</option>
							</select>
						</li>
						<li>
							<span>产品来源：</span>
							<select class="multiselect" id="single6" name = "productOri">
								<option value="1">关联方</option>
								<option value="2">市场外采</option>
								<option value="3">契约基金</option>
							</select>
						</li>
						<li>
							<span>业务类型：</span>
							<select class="multiselect" id="single7" name = "businessType">
								<option value="1">通道业务</option>
								<option value="2">撮合业务</option>
							</select>
						</li>
					</ul>
					<div class="content-btn">
						<span class="title-info" style="margin-left:30px;">业绩比较基准</span>
					</div>
					<div class="content-info-product">
						<table class="content-table-two editTable" cellspacing="0" cellpadding="0" id = "achieveCompare">
							<thead>
								<tr>
									<td>收益级别名称</td>
									<td>金额下限(含)万元</td>
									<td>金额上限(不含)万元</td>
									<td>预期收益率(%)</td>
									<td>操作</td>
								</tr>
							</thead>
							<tbody>
								<tr>
									<td><input class="readInput" type="text" name = "achieveCompares[0].name" placeholder=""></td>
									<td><input class="readInput" type="text" name = "achieveCompares[0].cashdown" placeholder=""></td>
									<td><input class="readInput" type="text" name = "achieveCompares[0].cashup" placeholder=""></td>
									<td><input class="readInput" type="text" name = "achieveCompares[0].appointincome" placeholder=""></td>
									<td><i class="newSet-list" onclick="addlist()">+</i></td>
								</tr>
							</tbody>
						</table>
					</div>
				</form>
				<div class="content-btn">
					<span class="title-info" style="margin-left:30px;">相关附件列表</span>
				</div>
				<ul class="info-area" style="border-bottom:none;">
					<li> 
						<span class="info-red v-align"><font color="red">*</font>附件：</span>
						<select class="multiselect" id="single8">
							<option value="1">产品简版</option>
							<option value="2">产品推介材料</option>
							<option value="3">产品说明书</option>
							<option value="4">产品确认函</option>
							<option value="5">产品合同模板</option>
							<option value="6">风险揭示书</option>
							<option value="7">其他</option>
						</select>
						<div id="demo" class="demo"></div>
					</li>
					<li>
						<div class="content-info">
							<table class="content-table-text" cellspacing="0" cellpadding="0">
								<tbody>
									<tr>
										<td class="td-1" name="1.xls"><img src="images/1111.png" alt=""></td>
										<td class="td-2">
											<span class="color-operation">产品推介</span>
											<p>海外移民产品规划书.xls（5MB）</p>
											<span>上传人：</span><strong>王大锤</strong><i>2017-04-23/13:50</i>
										</td>
										<td class="td-3"><i class="btn-operation1" onclick="del()">删除</i></td>
									</tr>
								</tbody>
							</table>
							<div class="prover-info">
								<span>注意事项</span>
								<p>支持最大上传文件大小未50MB！</p>
								<p>目前支持的附件后缀格式为：jpg,jpeg,gif,png,doc,docx,xlx,xlsx,pdf,rar,zip 如需其他格式支持，请联系管理员</p>
							</div>
						</div>
					</li>
					<li style="border-top: 1px solid #e6e6e6;padding-top: 30px;margin-top:20px;">
						<div class="line-bottom mabot100">
							<button class="save-btn mgauto" id = "save">保存</button>
							<button class="save-btn">取消</button>
						</div>
					</li>
				</ul>
			</div>
		</div>
	</div>
<script src="js/jquery-1.12.0.min.js"></script>
<script src="js/allProduct.js"></script>
<script src="js/select.jquery.js"></script>
<script src="lib/rili/laydate.dev.js"></script>
<script src="js/zyFile.js"></script><!-- 引用核心层插件 -->
<script src="js/zyUpload.js"></script><!-- 引用控制层插件 -->
<script src="js/jq22.js"></script><!-- 引用初始化JS -->
<script src="js/util.js"></script>
<script type="text/javascript" src="js/layer.js"></script>
<script type="text/javascript">
	function callback(message){
		toMenu("productList.html");
	}
    $(document).ready(function (){//新增
    	$("#save").click(function(){
			var json = $("#baseInformation").serializeArray();
			jquerypost("/market/product/save", json,false,callback);
		});
		var eventEnd = {  
	        elem: '#data-time',  
	        format: 'YYYY/MM/DD',  
	        min: laydate.now(), 
	        max: '2099-06-16',  
	        istime: true,  
	        istoday: true,  
	        start: laydate.now(0,"YYYY-MM-DD"),  
	        choose: function(enddatas){  
	        	/* activityStart.max = enddatas; //结束日选好后，重置开始日的最大日期  
	        	activity_end_time=enddatas; */
	        }  
	    };
	});
	$('.multiselect').multiselect({setMaxOptionNum:4,selectedHtmlValue:''});
	$('#single').multiselect({multiple:false,selectedHtmlValue:'全部',setWidth: 570+'px'});
	$('#single1').multiselect({multiple:false,selectedHtmlValue:'全部',setWidth: 570+'px'});
	$('#single2').multiselect({multiple:false,selectedHtmlValue:'全部',setWidth: 570+'px'});
	$('#single3').multiselect({multiple:false,selectedHtmlValue:'全部',setWidth: 85+'px'});
	$('#single4').multiselect({multiple:false,selectedHtmlValue:'全部',setWidth: 570+'px'});
	$('#single5').multiselect({multiple:false,selectedHtmlValue:'全部',setWidth: 570+'px'});
	$('#single6').multiselect({multiple:false,selectedHtmlValue:'全部',setWidth: 570+'px'});
	$('#single7').multiselect({multiple:false,selectedHtmlValue:'全部',setWidth: 570+'px'});
	$('#single8').multiselect({multiple:false,selectedHtmlValue:'全部',setWidth: 570+'px'});

	$('select').change(function(){
			// alert(1);
	});
	$('select').on('change',function(){
		console.log($(this).val())
		console.log($(this).find("option:selected").text())
	});
	function addingPeople(){
		parent.layer.open({
		    type: 2,
		    title: '员工搜索',
		    shadeClose: true,
		    shade: 0.2,
	        maxmin: true, //开启最大化最小化按钮
	        area: ['870px', '400px'],
	        content: 'addingPeople.html'
        });
	};

	function addingTeam(){
			  parent.layer.open({
		      type: 2,
		      title: '团队搜索',
		      shadeClose: true,
		      shade: 0.2,
		      maxmin: true, //开启最大化最小化按钮
		      area: ['870px', '400px'],
		      content: 'addingTeam.html'
		});
	};

	function addingBusinessDepartment(){
			  parent.layer.open({
		      type: 2,
		      title: '营业部搜索',
		      shadeClose: true,
		      shade: 0.2,
		      maxmin: true, //开启最大化最小化按钮
		      area: ['870px', '400px'],
		      content: 'addingBusinessDepartment.html'
		});
	};

	function addingLargeArea(){
			  parent.layer.open({
		      type: 2,
		      title: '大区搜索',
		      shadeClose: true,
		      shade: 0.2,
		      maxmin: true, //开启最大化最小化按钮
		      area: ['870px', '400px'],
		      content: 'addingLargeArea.html'
		});
	};

	function getHeight(){
		var myiframeH=$(".main-content-box").height();
		var _parent=$(window.parent.document);
        	_parent.find('body').css('height',(myiframeH+150)+'px');
			_parent.find('.main-position').css('height',(myiframeH+100)+'px');
    };

    function del(){
			parent.layer.open({
		      type: 2,
		      title: '删除',
		      shadeClose: true,
		      shade: 0.2,
		      maxmin: true, //开启最大化最小化按钮
		      area: ['450px', '250px'],
		      content: 'delete.html'
		    });
	};
	
	function addlist(){
		var _tbody=$('.editTable').children('tbody');
		var index = _tbody.find("tr").length;
		var _tr='<tr>'+
					'<td><input class="readInput" type="text" achieveCompares[' + index + '].name placeholder=""></td>'+
					'<td><input class="readInput" type="text" achieveCompares[' + index + '].cashdown placeholder=""></td>'+
					'<td><input class="readInput" type="text" achieveCompares[' + index + '].cashup placeholder=""></td>'+
					'<td><input class="readInput" type="text" achieveCompares[' + index + '].appointincome placeholder=""></td>'+
					'<td><i class="delete-list" onclick="dellist(this)">-</i></td>'+
				'</tr>';
			_tbody.append(_tr);
			getHeight();
	};
	function dellist(del){
		$(del).parent('td').parent('tr').remove();
		getHeight();
	};
	function getMethodValue(){
		alert('ok');
	};

	$('#demo').resize(function(){
		getHeight();
	});
	$('.content-info').resize(function(){
		getHeight();
	});
</script>
</body>
</html>